package global.com.loansapplication.ui.actviity;

import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import javax.inject.Inject;

import global.com.loansapplication.R;
import global.com.loansapplication.base.BaseActivity;
import global.com.loansapplication.event.NetErrorEvent;
import global.com.loansapplication.ui.actviity.login.biz.LoginBiz;
import global.com.loansapplication.ui.actviity.login.contract.LoginContract;
import global.com.loansapplication.ui.actviity.login.presenter.LoginPresenter;


/**
 * 登录界面
 * Created by admin on 2017/8/4.
 */

public class ModleAct extends BaseActivity implements LoginContract.View {



    @Inject
    LoginPresenter presenter;
    @Inject
    LoginBiz biz;


    @Override
    protected void setRoot() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            Window window = getWindow();
            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
            window.setStatusBarColor(Color.TRANSPARENT);
        }
        setTitleBar("#2CB6AB");
        setContentView(R.layout.activity_login);

    }

    @Override
    protected void setup() {
//        DaggerLoginComponent.builder().loginModule(new LoginModule(this)).build().inject(this);
        setToolBar("苏D123456", "");
        presenter.setBiz(biz);
    }


    @Override
    protected void init(@Nullable Bundle savedInstanceState) {
//        CommonViewUtil.setDarw(right, this, R.mipmap.back, -1,
//                -1, -1);

    }


    @Override
    public void onNetErrorEvent(NetErrorEvent event) {
        super.onNetErrorEvent(event);
    }

    @Override
    protected void onNetError(NetErrorEvent event) {

    }

    /***
     * Stop location service
     */
    @Override
    protected void onStop() {

        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        biz.onDestory();

    }

    @Override
    public void showLayout(boolean ishow) {

    }

    @Override
    public void countDown() {

    }

    @Override
    public void showPwdType(int type, boolean isshow) {

    }
}
